package io.mybatis.example.springboot.model;

import io.mybatis.provider.Entity;
import org.apache.ibatis.type.JdbcType;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * sys_role - 角色信息表
 *
 * @author mkj
 */
@Getter
@Setter
@Entity.Table("sys_role" remark = "角色信息表", autoResultMap = true)
public class SysRoleDO {
  @Entity.Column(value = "role_id", id = true, remark = "角色ID", updatable = false, insertable = false)
  private Long roleId;

  @Entity.Column(value = "role_name", remark = "角色名称")
  private String roleName;

  @Entity.Column(value = "role_key", remark = "角色权限字符串")
  private String roleKey;

  @Entity.Column(value = "role_sort", remark = "显示顺序")
  private Integer roleSort;

  @Entity.Column(value = "data_scope", remark = "数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）")
  private String dataScope;

  @Entity.Column(value = "menu_check_strictly", remark = "菜单树选择项是否关联显示")
  private Boolean menuCheckStrictly;

  @Entity.Column(value = "dept_check_strictly", remark = "部门树选择项是否关联显示")
  private Boolean deptCheckStrictly;

  @Entity.Column(value = "status", remark = "角色状态（0正常 1停用）")
  private String status;

  @Entity.Column(value = "del_flag", remark = "删除标志（0代表存在 2代表删除）")
  private String delFlag;

  @Entity.Column(value = "create_by", remark = "创建者")
  private String createBy;

  @Entity.Column(value = "create_time", remark = "创建时间", jdbcType = JdbcType.TIMESTAMP)
  private Date createTime;

  @Entity.Column(value = "update_by", remark = "更新者")
  private String updateBy;

  @Entity.Column(value = "update_time", remark = "更新时间", jdbcType = JdbcType.TIMESTAMP)
  private Date updateTime;

  @Entity.Column(value = "remark", remark = "备注")
  private String remark;

}
